<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"   content="width=device-width, initial-scale=1">
    <title>list</title>
    {% include 'index/public/style.html' %}
</head>
<body>
<div class="container ">
    {% include 'index/public/head.html' %}
    {% include 'index/public/nav.html' %}
    <div class="box" >

        <h1>{{name}}</h1>
        <table class="table" style="width:100%">
          <thead>
            <tr>
              <th>ID</th>
              <th>标题</th>
              <th>发表时间</th>
              <th>浏览数</th>
            </tr>
          </thead>
          <tbody>
           {% for item in pn.items %}
            <tr>
              <td>{{item.id}}</td>
              <td><a href="{{get_url('index.index.show',{'id':item.id})}}">{{ loop.index }}{{ item.title }}</td>
              <td>{{item.addtime}}</td>
              <td>{{item.view}}</td>
           </tr>
           {% else %}
             <tr> <td colspan="3">无数据</td></tr>
           {% endfor %}
          </tbody>
        </table>
        <div>

        </div>
         <div>
        </div>
        <nav class="pagination" role="navigation" aria-label="pagination">
            <a class="pagination-previous">{{pn.page}}/{{pn.pages}}</a>
            <a class="pagination-next">总条数:{{pn.total}}</a>
            <ul class="pagination-list">
            {% for item in range(0,pn.pages) %}
                <li><a class="pagination-link {%if pn.page==loop.index%}is-current{% endif %}" href="{{get_url('index.index.list',{'id':id,'page':loop.index})}}">{{ loop.index }}</a></li>
            {% endfor %}
          </ul>
        </nav>
    </div>
    {% include 'index/public/foot.html' %}
</div>
</body>
</html>
